import "package:flutter/material.dart";
// desc: button
class Button extends StatelessWidget {
  Button({
    Key key,
    this.onTap,
    this.text
  }) : super(key: key);
  Function onTap;
  String text;


  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: (){
        if(onTap != null){
          onTap();
        }
      },
      child: Container(
        height: 45,
        decoration: BoxDecoration(
            color: Color.fromRGBO(144, 1, 236, 1),
            borderRadius: BorderRadius.all(Radius.circular(4))
        ),
        child: Center(
          child: Text('$text', style: TextStyle(fontSize: 14, color: Colors.white)),
        ),
      ),
    );
  }
}